<template>
  <div class="page-vision">
    <div class="navbar-wrap">
      <div class="Navbarold">
        <nav>
          <div class="navbar-logo"></div>
          <div class="navbar-title">猫眼电影</div>
          <div class="navbar-button">
            <div class="nav-btn">
              <img src="../assets/images/nav-button.png" alt="" />
            </div>
          </div>
        </nav>
      </div>
    </div>
    <div class="switch-tab-bar">
      <a href="#">
        <div class="tab-item active">
          <h2>推荐</h2>
        </div>
      </a>
      <a href="#">
        <div class="tab-item">
          <h2>热片解读</h2>
        </div>
      </a>
      <a href="#">
        <div class="tab-item">
          <h2>新片预告</h2>
        </div>
      </a>
      <a href="#">
        <div class="tab-item">
          <h2>速看电影</h2>
        </div>
      </a>
      <a href="#">
        <div class="tab-item">
          <h2>剧集综艺</h2>
        </div>
      </a>
    </div>
    <section class="videos">
      <div class="video-item">
        <a href="#">
          <div class="videoplayer">
            <video src=""></video>
            <img
              class="poster"
              src="../assets/images/v01.jpg"
              alt="地里掉下一颗炸弹，从此村民天天盼着飞机来轰炸"
            />
            <div class="video-title">
              地里掉下一颗炸弹，从此村民天天盼着飞机来轰炸
            </div>
            <div class="play-but"></div>
            <div class="info-bar clearfix">
              <div class="time">10:18</div>
            </div>
          </div>
        </a>
        <div class="video-info">
          <div class="left">
            <img
              class="user-avatar"
              src="../assets/images/u01.jpg"
              alt=""
            />
            <div class="user-nickname">电影十里廊</div>
          </div>
          <div class="right">
            <div class="video-praise">472</div>
            <a href="#" class="comment">
              <div class="video-comment">0</div>
            </a>
            <a href="#" class="share">
              <div class="video-share"></div>
            </a>
          </div>
        </div>
      </div>
    </section>
    <bottom-tabs></bottom-tabs>
  </div>
</template>

<script>
import BottomTabs from "../components/BottomTabs.vue";
export default {
  data() {
    return {
      show: true,
    };
  },
  methods: {
  
  },
  components: {
    BottomTabs,
  },
};
</script>

<style lang="less" scoped>
.page-vision{
    width: 100%;
    height: 100%;
    overflow-y: scroll;
// 头部
.navbar-wrap {
  width: 100%;

  .Navbarold {
    background-color: #e54847;
    height: 38px;
    padding: 6px;
    position: relative;
    overflow: hidden;

    & > nav {
      width: 100%;
      height: 100%;

      .navbar-logo {
        width: 26.7%;
        height: 38px;
        float: left;
      }

      .navbar-title {
        width: 44.9%;
        height: 38px;
        font-size: 18px;
        color: #fff;
        text-align: center;
        line-height: 38px;
        float: left;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        position: relative;
      }

      .navbar-button {
        position: relative;
        width: 26.7%;
        height: 38px;
        float: right;
        display: flex;
        align-items: center;
        justify-content: flex-end;

        .nav-btn {
          width: 17px;
          height: 16px;
          margin-right: 6px;
          text-align: right;

          & > img {
            width: 17px;
            height: 16px;
            display: block;
          }
        }
      }
    }
  }
}
// 导航
.switch-tab-bar {
  width: 100%;
  height: 45px;
  position: relative;
  white-space: nowrap;
  overflow: scroll;
  background-color: #fff;
  border-top: 1px solid #e6e6e6;

  & > a {
    .tab-item {
      color: #333;
      height: 45px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin: 0 12px;
      position: relative;

      & > h2 {
        font-size: 15px;
        line-height: 24px;
        font-weight: 450;
      }
    }

    .active {
      & > h2 {
        font-size: 17px;
      }

      &::after {
        content: "";
        display: block;
        position: absolute;
        bottom: 3px;
        width: 20px;
        height: 3px;
        border-radius: 1px;
        background: #f03d37;
      }
    }
  }

  &::-webkit-scrollbar {
    display: none;
  }
}
// 内容
.videos {
  position: relative;
  overflow: hidden;
  padding-bottom: 48px;
  background-color: #f5f5f5;

  .video-item {
    margin-bottom: 6px;
    position: relative;

    & > a {
      .videoplayer {
        position: relative;
        height: 211px;
        overflow: hidden;
        background-color: #000;

        & > video {
          width: 100%;
          height: 100%;
          background-color: #000;
          object-fit: cover;
        }

        .poster {
          position: absolute;
          top: 0;
          left: 0;
          width: 100%;
          height: 234.5px;
        }

        .video-title {
          position: absolute;
          top: 0;
          left: 0;
          font-family: PingFangSC-Medium, serif;
          font-size: 17px;
          color: #fff;
          letter-spacing: 0;
          line-height: 25px;
          z-index: 1;
          margin: 9px 15px 19px 15px;
          display: -webkit-box;
          -webkit-box-orient: vertical;
          -webkit-line-clamp: 2;
          text-overflow: ellipsis;
          word-wrap: break-word;
          word-break: break-all;
          overflow: hidden;
        }

        .play-but {
          position: absolute;
          left: 50%;
          top: 50%;
          z-index: 10;
          width: 58px;
          height: 58px;
          margin-top: -29px;
          margin-left: -29px;
          background-image: url(../assets/images/video-btn-play.png);
          background-size: contain;
        }

        .info-bar {
          position: absolute;
          left: 0;
          bottom: 0;
          right: 0;
          height: 30px;
          line-height: 30px;
          background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.5));
          color: #fff;
          font-size: 12px;

          .time {
            float: right;
            margin-right: 10px;
          }
        }
      }
    }

    .video-info {
      height: 46px;
      background-color: #fff;
      padding-left: 15px;
      display: flex;
      justify-content: space-between;

      .left {
        height: 100%;
        display: flex;
        align-items: center;

        .user-avatar {
          width: 22px;
          height: 22px;
          border-radius: 50%;
        }

        .user-nickname {
          margin-left: 8px;
          color: #666;
          font-size: 14px;
        }
      }

      .right {
        height: 100%;
        display: flex;
        align-items: center;

        .video-praise {
          background: url(../assets/images/video-praise.png) no-repeat 0;
          background-size: 18px 18px;
          font-size: 12px;
          padding-left: 23px;
          padding-right: 5px;
          height: 35px;
          line-height: 35px;
          margin-right: 26.5px;
        }

        .comment {
          .video-comment {
            background: url(../assets/images/video-comment.png) no-repeat 0;
            background-size: 18px 18px;
            font-size: 12px;
            padding-left: 23px;
            padding-right: 5px;
            height: 35px;
            line-height: 35px;
            margin-right: 12px;
            color: #666;
          }
        }
        .share {
          display: inline-block;
          .video-share {
            background: url(../assets/images/video-share.png) no-repeat 50%;
            background-size: 18px 18px;
            width: 18px;
            height: 35px;
            padding: 0 7.5px;
            margin-right: 7.5px;
          }
        }
      }
    }
  }
}
}
</style>